/* 导航栏样式更新 */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    background-color: var(--primary-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Logo样式优化 */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    padding-right: 2rem;
}

.logo-icon {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
}

.logo-icon i:first-child {
    color: #2ecc71;
}

.logo-icon i:last-child {
    color: #3498db;
}

.logo span {
    font-size: 1.2rem;
    font-weight: 500;
    white-space: nowrap;
}

/* 导航链接样式优化 */
.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-links li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

/* 页面容器样式 */
.main-container {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    display: flex;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    will-change: opacity, transform;
}

.main-container.page-exit {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.main-container.page-enter {
    opacity: 0;
    transform: translateY(-10px);
}

/* 用户信息样式优化 */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    padding-left: 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.username {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.logout-btn i {
    font-size: 1rem;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.3s ease;
}

.avatar:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

/* 响应式优化 */
@media (max-width: 1024px) {
    .main-nav {
        padding: 0 1rem;
    }

    .logo {
        padding-right: 1rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        padding: 0.5rem 0.75rem;
    }

    .user-info {
        padding-left: 1rem;
    }
}

@media (max-width: 768px) {
    .logo span {
        display: none;
    }

    .username {
        display: none;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

/* 通用容器样式 */
.main-container {
    margin-top: 60px;
    height: calc(100vh - 60px);
    display: flex;
}

/* 通用侧边栏样式 */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #eee;
    padding: 1.5rem;
    height: 100%;
    overflow-y: auto;
}

/* 通用内容区域样式 */
.content-area {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: var(--background-color);
}

/* 通用卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

/* 状态标签样式 */
.status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

.status.online {
    background: var(--secondary-color);
    color: white;
}

.status.offline {
    background: #95a5a6;
    color: white;
}

/* 按钮样式补充 */
.tool-btn {
    width: 100%;
    margin-bottom: 0.5rem;
    text-align: left;
    padding: 0.75rem 1rem;
}

.btn-control {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 优化视频容器性能 */
.video-container {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

.video-wrapper {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
}

/* 防止动画过程中出现滚动条跳动 */
html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* 确保内容区域在导航栏下方 */
body {
    padding-top: 60px;
}

/* 导航栏用户信息样式 */
.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.user-name {
    color: #2c3e50;
    font-weight: 500;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #f8f9fa;
    color: #e74c3c;
    border-color: #e74c3c;
}

.btn-logout i {
    font-size: 1rem;
} 